@use "bulma/sass/utilities/css-variables" as cv;
@use "bulma/sass/utilities/mixins" as mixins;

.sidebar-bg {
    position: absolute;
    bottom: 0;
    right: 50%;
    left: 0;
    top: 0;
    background: cv.getVar('background');
    @include mixins.touch {
        display: none;
    }
}

.sidebar {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 16rem;
    padding: 3rem 1rem;
    background: cv.getVar('background');
    .sidebar-menu {
        width: 100%;
        .sidebar-label {
            margin-bottom: 0.5em;
            color: cv.getVar('grey');
            font-size: 0.9em;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }
        ul {
            margin-bottom: 1.5em;
            margin-top: 0;
            li {
                margin-bottom: 0.25em;
                font-weight: cv.getVar('weight-semibold');
                li {
                    font-weight: cv.getVar('weight-normal');
                    font-size: 0.9rem;
                }
            }
            ul {
                margin-left: 1em;
                margin-top: 0.25em;
                margin-bottom: 0.5em;
            }
            a {
                display: flex;
                color: cv.getVar('text');
                &.is-active {
                    color: cv.getVar('primary');
                    font-weight: cv.getVar('weight-semibold');
                    &:hover {
                        text-decoration: underline;
                    }
                }
                &:hover:not(.is-active) {
                    color: cv.getVar('link');
                }
            }
            .sidebar-menu-text {
                flex: 1;
            }
        }
    }
    .sidebar-btt {
        position: sticky;
        margin-top: 1.5rem;
        top: calc(100vh - 3rem);
        font-size: 0.8rem;
        color: cv.getVar('text');
        font-weight: cv.getVar('weight-bold');
        .icon {
            font-size: 18px;
            margin-right: 0.25rem;
        }
        &:hover {
            color: cv.getVar('link');
        }
    }
    @include mixins.touch {
        width: 100%;
        order: 2;
    }
}
